How to Android WebView Opens links in browser instead of app?
3221
03-Feb-2015
Every time I click on a link in the webview, it takes me out of the webview and into a separate browser window. How do I get all the links to open in the webview?
Updated on 03-Feb-2015
Lillian Martin
03-Feb-2015You need to implement setWebViewClient(....) like so.
webView.setWebViewClient(new WebViewClient() {
@Overridepublic boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});